//
//  AY_ReadViewController.h
//  AiYue
//
//  Created by mac on 2023/10/17.
//

#import "AY_BaseViewController.h"

@class AY_ReadViewController;
NS_ASSUME_NONNULL_BEGIN

@protocol SXAReadViewControllerDelegate <NSObject>

-(void)lastPage:(AY_ReadViewController *)controller;

-(void)nextPage:(AY_ReadViewController *)controller;

-(void)invokeMenu:(AY_ReadViewController *)controller;

@end

@interface AY_ReadViewController : AY_BaseViewController

@property (nonatomic,assign,getter=isMirror) BOOL mirror;   //是否是镜像，仿真翻页使用该参数
@property (nonatomic,assign,readonly) NSInteger page;   //当前阅读的页数
@property (nonatomic,assign,readonly) NSInteger charpterIndex; //当前阅读章节的索引
@property (nonatomic,strong,readonly) NSAttributedString *content;  //内容
@property (nonatomic,strong,readonly) NSString *charpter;       //章节名称
@property (nonatomic,assign,readonly) NSInteger totalPage;      //总页数
@property (nonatomic,assign,readonly) NSInteger totalCharpter;  //总章节

@property (nonatomic,strong) BookContentModel *bookContentModel;    //当前阅读的章节
@property (nonatomic,strong) NSAttributedString *charpterContent;   //当前章节的所有内容包括标题
@property (nonatomic,strong) NSArray *pages;        //分页信息
@property (nonatomic, strong) NSString *articleid; // 书籍ID 必传
@property (nonatomic,weak) id<SXAReadViewControllerDelegate> delegate;
/// 设置内容显示
/// @param charpter 章节
/// @param content 内容
/// @param page 当前页数
/// @param totalPage 章节总页数
/// @param chaprterIndex 当前章节数
/// @param totalCharpter 总章节数
-(void)setCharpter:(NSString *)charpter content:(NSAttributedString *)content page:(NSInteger)page totalPage:(NSInteger)totalPage charpterIndex:(NSInteger)chaprterIndex totalCharpter:(NSInteger)totalCharpter;

-(void)showPyView:(BOOL)isShow;
- (void)setColors;
@end

NS_ASSUME_NONNULL_END
